<?php
namespace Amis\functions;
class ButtonGroup extends Action
{
    public string $type = 'button-group';


    public function className($className)
    {
        $this->className = $className;
        return $this;
    }

    public function vertical(bool $vertical = false)
    {
        $this->vertical = $vertical;
        return $this;
    }

    public function tiled(bool $tiled = false)
    {
        $this->tiled = $tiled;
        return $this;
    }

    public function btnLevel($type = '')
    {
        if (in_array($type, ['link', 'primary', 'secondary', 'info', 'success', 'warning', 'danger', 'light', 'dark', 'default'])) {
            $this->btnLevel = $type;
        }
        return $this;
    }

    public function btnActiveLevel($type = '')
    {
        if (in_array($type, ['link', 'primary', 'secondary', 'info', 'success', 'warning', 'danger', 'light', 'dark', 'default'])) {
            $this->btnActiveLevel = $type;
        }
        return $this;
    }

    public function buttons(array $buttons)
    {
        $this->buttons = $buttons;
        return $this;
    }
}